package com.sgcc.sguap.bluefw.jit.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

import io.bluefw.microapp.core.Globalize;
import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
@Entity
@Table(name = "JIT_ProductLine")
@Globalize(value = "生产线")
@NamedQueries({
    @NamedQuery(
            name = "com.sgcc.sguap.bluefw.jit.ProductLine.findAll",
            query = "SELECT p FROM ProductLine p"
    )
})
public class ProductLine {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private long id;
    
    @Column(length=32, nullable=false)
    @Globalize(value = "编码")
    private String code;
    
    @Column(length=32, nullable=false)
    @Globalize(value = "名称")
    private String name;
    
    @Column(nullable=false)
    @Globalize(value = "节拍")
    private int taktTime;
    
    @Enumerated(EnumType.STRING)
    @Column(length=16, nullable=false)
    @Globalize(value = "节拍单位")
    private TimeUnitEnum taktUnit;
}
